<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>登录</title>
  <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" />
  <style>
    .panel-wrap {
      width: 500px;
      margin: 100px auto;
      padding-top: 20px;
      box-shadow: 0 0 20px #ccc;
      border-radius: 10px;
    }
  </style>
</head>

<body>
  <div class="container">
    <div class="panel panel-default panel-wrap">
      <div class="panel-body">
        <form class="form-horizontal">
          <div class="form-group">
            <label for="inputUserName" class="col-sm-2 control-label">用户名</label>
            <div class="col-sm-10">
              <input type="text" class="form-control" id="inputUserName" placeholder="请输入用户名" />
            </div>
          </div>
          <div class="form-group">
            <label for="inputPassword" class="col-sm-2 control-label">密码 </label>
            <div class="col-sm-10">
              <input type="password" class="form-control" id="inputPassword" placeholder="请输入密码" />
            </div>
          </div>
          <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
              <div class="checkbox">
                <label>
                  <input type="checkbox"> 记住密码
                </label>
              </div>
            </div>
          </div>
          <div class="form-group">
            <div class="col-sm-10 text-center">
              <button type="button" class="btn btn-primary">登录</button>
              <button type="button" class="btn btn-default" data-toggle="modal" data-target="#regModal">注册</button>
            </div>
          </div>
        </form>
      </div>
    </div>

  </div>
  <div class="modal fade" tabindex="-1" role="dialog" id="regModal" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
              aria-hidden="true">&times;</span></button>
          <h4 class="modal-title">注册用户</h4>
        </div>
        <div class="modal-body">
          <form class="form-horizontal">
            <div class="form-group">
              <label for="inputUserName" class="col-sm-2 control-label">用户名</label>
              <div class="col-sm-10">
                <input type="text" class="form-control" id="inputUserName" placeholder="请输入用户名" />
              </div>
            </div>
            <div class="form-group">
              <label for="inputPassword" class="col-sm-2 control-label">密码 </label>
              <div class="col-sm-10">
                <input type="password" class="form-control" id="inputPassword" placeholder="请输入密码" />
              </div>
            </div>
          </form>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
          <button type="button" class="btn btn-primary">保存</button>
        </div>
      </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
  </div><!-- /.modal -->
  <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
  <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</body>

</html>